//
//  TTHomeMarketViewCell.m
//  TaoTuo
//
//  Created by 周晨晔 on 2019/9/20.
//  Copyright © 2019 admin. All rights reserved.
//

#import "TTHomeMarketViewCell.h"

@interface TTHomeMarketViewCell ()

@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *dateLabel;
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;
@property (weak, nonatomic) IBOutlet UILabel *goupLabel;


@end

@implementation TTHomeMarketViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.backgroundColor = [UIColor clearColor];
    self.goupLabel.layer.cornerRadius = 5;
    self.selectionStyle = UITableViewCellSelectionStyleNone;
}

- (void)setModel:(TTMarketModel *)model
{
    _model = model;
    self.nameLabel.text = model.Text;
    self.dateLabel.text = self.model.DateTimeText;
    self.priceLabel.text = self.model.Price;
    self.goupLabel.text = self.model.BackPrice;
    
    
//    if ([self.model.UpsAndDownsPrice hasPrefix:@"+"]) {
//        self.goupLabel.textColor = UIColorHex(E74C3C);
//    } else if ([self.model.UpsAndDownsPrice hasPrefix:@"-"]) {
//        self.goupLabel.textColor = UIColorHex(2ECC71);
//    } else {
//        self.goupLabel.textColor = UIColorHex(333333);
//    }
    
}


@end
